#ifndef _EVENT_MSGQUEUE_H_
#define _EVENT_MSGQUEUE_H_

#include <stdint.h>
#include <stdbool.h>
#include <event.h>
#include <pthread.h>

#ifdef __cplusplus
extern "C" {
#endif

	struct event_msgqueue;

	typedef void (*msgqueue_callback)(struct event_base* , void*, void*);
	struct event_msgqueue *msgqueue_new(struct event_base *base, int queue_hwm, int queue_lwm, bool enable_lock, msgqueue_callback callback, void *cbarg);
	int msgqueue_push(struct event_msgqueue *, void *);
	unsigned int msgqueue_length(struct event_msgqueue *);
	void msgqueue_destroy(struct event_msgqueue*);

#ifdef __cplusplus
}
#endif

#endif
